home *** CD-ROM | disk | FTP | other *** search
- ;**************************************************************
- ;
- ; stack.asm
- ;
- ; staff
- ;
- ; 02-11-91
- ;
- ; (C) Texas Instruments Inc., 1992
- ;
- ; Refer to the file 'license.txt' included with this
- ; this package for usage and license information.
- ;
- ;**************************************************************
-
-
- .mmregs
- .text
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; This routine expands the stack while letting the
- ; main program determine where to store the stack
- ; contents, or from where to restore them.
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- STACK: BCNDD POP,NEQ ;Delayed branch if POPD required
- MAR *,AR2 ;Use AR2 as stack pointer
- POP ;Get return address
- RPT #6 ;repeat 7 times
- PSHD *+ ;Put memory in stack
- BACC ;Return to main program
- POP: MAR *- ;Align AR2
- RPT #6 ;Repeat 7 times
- POPD *- ;Put stack in memory
- MAR *+ ;Realign stack pointer
- BACC ;Return to main program